package com.diduweiwu.util;

import com.jfinal.kit.Prop;
import com.jfinal.kit.PropKit;

/**
 * Created by Administrator on 2016/12/18.
 */
public class PropUtil {
    private static Prop prop;

    /**
     * 获取配置文件读取器
     *
     * @return
     */
    public static Prop getProp() {
        if (prop == null) {
            prop = PropKit.use("config.ini");
        }
        return prop;
    }

    public static String getProp(String key) {
        return getProp().get(key);
    }

    public static String getSecret() {
        return getProp("secret");
    }

    public static String getSessionkey() {
        return getProp("sessionkey");
    }
}
